package com.hawk.eye.server.constant;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @className: WorkOrderStatus
 * @description:
 * @author: salad
 * @date: 2023/12/30
 **/
@Getter
@AllArgsConstructor
public enum WorkOrderStatusEnum {

    WAIT_REVIEW("0", "待审批"),

    REVIEWED_WAIT_EXEC("1", "未执行"),

    REJECT("2", "拒绝"),

    REVIEWED_EXECED("3", "已执行");

    private String value;

    private String name;

    public static String getName(String value) {
        for (WorkOrderStatusEnum workOrderStatusEnum : values()) {
            if (workOrderStatusEnum.value.equals(value)) {
                return workOrderStatusEnum.name;
            }
        }
        return "";
    }

}
